﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;

/// <summary>
/// Summary description for ParseNavigationMenu
/// </summary>
public class ParseNavigationMenu
{
	/// Main Menu Name.
    /// </summary>
    private const string MainMenuName = "Name";

    /// <summary>
    /// Main Menu Link.
    /// </summary>
    private const string MainMenuLink = "Link";

    /// <summary>
    /// Main Menu Name type.
    /// </summary>
    private const string MainMenuNameType = "System.String";

    /// <summary>
    /// Main menu navigation info.
    /// </summary>
    public static DataSet NavigationMenu { get; set; }

    /// <summary>
    /// Build the dataset for navigation menu
    /// </summary>
	static ParseNavigationMenu()
	{
        NavigationMenu = new DataSet();
        NavigationMenu.Tables.Add(BuildMainMenu());
        NavigationMenu.Tables.Add(BuildSubMenu1());
        NavigationMenu.Tables.Add(BuildSubMenu2());
        NavigationMenu.Tables.Add(BuildSubMenu3());
        NavigationMenu.Tables.Add(BuildSubMenu4());
        NavigationMenu.Tables.Add(BuildSubMenu5());
        NavigationMenu.Tables.Add(BuildSubMenu6());
	}

    /// <summary>
    /// Build the main menu datatable.
    /// </summary>
    /// <returns></returns>
    public static DataTable BuildMainMenu()
    {
        DataTable mainMenu = new DataTable();
        mainMenu.Columns.Add(new DataColumn(MainMenuName, Type.GetType(MainMenuNameType)));
        mainMenu.Columns.Add(new DataColumn(MainMenuLink, Type.GetType(MainMenuNameType)));

        DataRow mainMenuRow1 = mainMenu.NewRow();
        mainMenuRow1[MainMenuName] = "佛经及淨土經論";
        mainMenuRow1[MainMenuLink] = "Default";
        mainMenu.Rows.Add(mainMenuRow1);

        DataRow mainMenuRow2 = mainMenu.NewRow();
        mainMenuRow2[MainMenuName] = "覺明之道";
        mainMenuRow2[MainMenuLink] = "Default";
        mainMenu.Rows.Add(mainMenuRow2);

        DataRow mainMenuRow3 = mainMenu.NewRow();
        mainMenuRow3[MainMenuName] = "會長講經";
        mainMenuRow3[MainMenuLink] = "Default";
        mainMenu.Rows.Add(mainMenuRow3);

        DataRow mainMenuRow4 = mainMenu.NewRow();
        mainMenuRow4[MainMenuName] = "人生雋語";
        mainMenuRow4[MainMenuLink] = "Default";
        mainMenu.Rows.Add(mainMenuRow4);

        DataRow mainMenuRow5 = mainMenu.NewRow();
        mainMenuRow5[MainMenuName] = "最新著作";
        mainMenuRow5[MainMenuLink] = "Default";
        mainMenu.Rows.Add(mainMenuRow5);

        DataRow mainMenuRow6 = mainMenu.NewRow();
        mainMenuRow6[MainMenuName] = "學會资源";
        mainMenuRow6[MainMenuLink] = "Default";
        mainMenu.Rows.Add(mainMenuRow6);

        return mainMenu;
    }

    /// <summary>
    /// Build the sub menu datatable 1.
    /// </summary>
    /// <returns></returns>
    public static DataTable BuildSubMenu1()
    {
        DataTable subMenu1 = new DataTable();
        subMenu1.Columns.Add(new DataColumn(MainMenuName, Type.GetType(MainMenuNameType)));
        subMenu1.Columns.Add(new DataColumn(MainMenuLink, Type.GetType(MainMenuNameType)));

        DataRow mainMenuRow1 = subMenu1.NewRow();
        mainMenuRow1[MainMenuName] = "淨土經論";
        mainMenuRow1[MainMenuLink] = "JingTuJingWen";
        subMenu1.Rows.Add(mainMenuRow1);

        DataRow mainMenuRow2 = subMenu1.NewRow();
        mainMenuRow2[MainMenuName] = "佛教經論";
        mainMenuRow2[MainMenuLink] = "Default";
        subMenu1.Rows.Add(mainMenuRow2);

        DataRow mainMenuRow3 = subMenu1.NewRow();
        mainMenuRow3[MainMenuName] = "佛教典籍";
        mainMenuRow3[MainMenuLink] = "Default";
        subMenu1.Rows.Add(mainMenuRow3);

        DataRow mainMenuRow4 = subMenu1.NewRow();
        mainMenuRow4[MainMenuName] = "佛學詞典";
        mainMenuRow4[MainMenuLink] = "Default";
        subMenu1.Rows.Add(mainMenuRow4);

        return subMenu1;
    }

    /// <summary>
    /// Build the sub menu datatable 2.
    /// </summary>
    /// <returns></returns>
    public static DataTable BuildSubMenu2()
    {
        DataTable subMenu2 = new DataTable();
        subMenu2.Columns.Add(new DataColumn(MainMenuName, Type.GetType(MainMenuNameType)));
        subMenu2.Columns.Add(new DataColumn(MainMenuLink, Type.GetType(MainMenuNameType)));

        DataRow mainMenuRow1 = subMenu2.NewRow();
        mainMenuRow1[MainMenuName] = "覺明之道一";
        mainMenuRow1[MainMenuLink] = "JueMingBook1Index";
        subMenu2.Rows.Add(mainMenuRow1);

        DataRow mainMenuRow2 = subMenu2.NewRow();
        mainMenuRow2[MainMenuName] = "覺明之道二";
        mainMenuRow2[MainMenuLink] = "JueMingBook2Index";
        subMenu2.Rows.Add(mainMenuRow2);

        DataRow mainMenuRow3 = subMenu2.NewRow();
        mainMenuRow3[MainMenuName] = "覺明之道三";
        mainMenuRow3[MainMenuLink] = "JueMingBook3Index";
        subMenu2.Rows.Add(mainMenuRow3);
        
        return subMenu2;
    }

    /// <summary>
    /// Build the sub menu datatable 3.
    /// </summary>
    /// <returns></returns>
    public static DataTable BuildSubMenu3()
    {
        DataTable subMenu3 = new DataTable();
        subMenu3.Columns.Add(new DataColumn(MainMenuName, Type.GetType(MainMenuNameType)));
        subMenu3.Columns.Add(new DataColumn(MainMenuLink, Type.GetType(MainMenuNameType)));

        DataRow mainMenuRow1 = subMenu3.NewRow();
        mainMenuRow1[MainMenuName] = "觀無量壽經";
        mainMenuRow1[MainMenuLink] = "GuanWuLiangShouJingAudioIndex";
        subMenu3.Rows.Add(mainMenuRow1);

        DataRow mainMenuRow2 = subMenu3.NewRow();
        mainMenuRow2[MainMenuName] = "往生論";
        mainMenuRow2[MainMenuLink] = "WangShengLunAudioIndex";
        subMenu3.Rows.Add(mainMenuRow2);

        DataRow mainMenuRow3 = subMenu3.NewRow();
        mainMenuRow3[MainMenuName] = "普賢行願品";
        mainMenuRow3[MainMenuLink] = "PuXianXingYuanPingAudioIndex";
        subMenu3.Rows.Add(mainMenuRow3);

        DataRow mainMenuRow4 = subMenu3.NewRow();
        mainMenuRow4[MainMenuName] = "萬善同歸集";
        mainMenuRow4[MainMenuLink] = "WanShanTongGuiJiAudioIndex";
        subMenu3.Rows.Add(mainMenuRow4);

        return subMenu3;
    }

    /// <summary>
    /// Build the sub menu datatable 4.
    /// </summary>
    /// <returns></returns>
    public static DataTable BuildSubMenu4()
    {
        DataTable subMenu4 = new DataTable();
        subMenu4.Columns.Add(new DataColumn(MainMenuName, Type.GetType(MainMenuNameType)));
        subMenu4.Columns.Add(new DataColumn(MainMenuLink, Type.GetType(MainMenuNameType)));

        DataRow mainMenuRow1 = subMenu4.NewRow();
        mainMenuRow1[MainMenuName] = "幸福之道";
        mainMenuRow1[MainMenuLink] = "Default";
        subMenu4.Rows.Add(mainMenuRow1);

        DataRow mainMenuRow2 = subMenu4.NewRow();
        mainMenuRow2[MainMenuName] = "慈悲可醫瞋";
        mainMenuRow2[MainMenuLink] = "Default";
        subMenu4.Rows.Add(mainMenuRow2);

        DataRow mainMenuRow3 = subMenu4.NewRow();
        mainMenuRow3[MainMenuName] = "惜世護生";
        mainMenuRow3[MainMenuLink] = "Default";
        subMenu4.Rows.Add(mainMenuRow3);

        DataRow mainMenuRow4 = subMenu4.NewRow();
        mainMenuRow4[MainMenuName] = "人行善福雖未至禍已遠去";
        mainMenuRow4[MainMenuLink] = "Default";
        subMenu4.Rows.Add(mainMenuRow4);

        DataRow mainMenuRow5 = subMenu4.NewRow();
        mainMenuRow5[MainMenuName] = "人生無常";
        mainMenuRow5[MainMenuLink] = "Default";
        subMenu4.Rows.Add(mainMenuRow5);

        return subMenu4;
    }

    /// <summary>
    /// Build the sub menu datatable 5.
    /// </summary>
    /// <returns></returns>
    public static DataTable BuildSubMenu5()
    {
        DataTable subMenu5 = new DataTable();
        subMenu5.Columns.Add(new DataColumn(MainMenuName, Type.GetType(MainMenuNameType)));
        subMenu5.Columns.Add(new DataColumn(MainMenuLink, Type.GetType(MainMenuNameType)));

        DataRow mainMenuRow1 = subMenu5.NewRow();
        mainMenuRow1[MainMenuName] = "壇經";
        mainMenuRow1[MainMenuLink] = "TanJingJiangJiIndex";
        subMenu5.Rows.Add(mainMenuRow1);

        DataRow mainMenuRow2 = subMenu5.NewRow();
        mainMenuRow2[MainMenuName] = "佛学散文";
        mainMenuRow2[MainMenuLink] = "NewArticlesIndex";
        subMenu5.Rows.Add(mainMenuRow2);

        return subMenu5;
    }

    /// <summary>
    /// Build the sub menu datatable 6.
    /// </summary>
    /// <returns></returns>
    public static DataTable BuildSubMenu6()
    {
        DataTable subMenu6 = new DataTable();
        subMenu6.Columns.Add(new DataColumn(MainMenuName, Type.GetType(MainMenuNameType)));
        subMenu6.Columns.Add(new DataColumn(MainMenuLink, Type.GetType(MainMenuNameType)));

        DataRow mainMenuRow1 = subMenu6.NewRow();
        mainMenuRow1[MainMenuName] = "學會簡介";
        mainMenuRow1[MainMenuLink] = "Default";
        subMenu6.Rows.Add(mainMenuRow1);

        DataRow mainMenuRow2 = subMenu6.NewRow();
        mainMenuRow2[MainMenuName] = "開放時間";
        mainMenuRow2[MainMenuLink] = "Default";
        subMenu6.Rows.Add(mainMenuRow2);

        DataRow mainMenuRow3 = subMenu6.NewRow();
        mainMenuRow3[MainMenuName] = "最新公告";
        mainMenuRow3[MainMenuLink] = "Default";
        subMenu6.Rows.Add(mainMenuRow3);

        return subMenu6;
    }
}